package com.zhu.quartz;

import com.zhu.index.controller.IndexController;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * Created by DELL on 2016/1/4.
 */
@Component
public class MyTask {

//    @Autowired(required = true)
//    private IndexController controller;

    @Scheduled(cron =  "0/30 * * * * ?")
    public void quartzTask(){
        System.out.println("spring quartz task:" + new Date());
//        System.out.println("IndexController init2:" + controller);
    }
}
